Random Variables & Probability distributions

Discrete variables

Probability function

For a discrete variable X that can take values from a1,a2,..., there is a probability function for X:

pi=P(X=ai)(i=1,2,...)

There are two major types of distributions for discrete variables (based on pi): Binominal distribution, and Poisson distribution.

- Binominal distribution

XB(n,p)pi=b(i;n,p)=(ni)pi(1p)ni

example: observe X times of heads when flipping coins for N times. Then X=1, 2, ..., N follows this distribution.

X¯=np Var(X)=np(1p)
Bernoulli distribution

The Bernoulli distribution is a special case of the binomial distribution with n=1.

  • Mean X¯=p
  • Var(X) = p(1-p)

Poisson distribution

XP(λ)P(X=i) = e^{- \lambda} \frac{\lambda { #i} }{i!}

It always works when X represents the number of events that happen within a temporal or spatial domain.

Binominal → Poisson

Poisson is an extreme case of binominal distribution:

for XB(n,p), when n is large & p is small & np = \lambda is not too large, then XP(λ).


Continuous variables

Probability density function (PDF)

For continuous variables, probability density functions are more useful than cumulative distribution functions.

For a continuous variable X with its CDF F(x), there is a probability density function of x:

f(x)=F(x)

The probability density function has 3 features:

f(x)0_f(x)dx=1P(a \leq X \leq b) = F (b) - F(a) = \int _a { #b} f(x) dx
Important

  • The PDF's analog for discrete variables is probability mass function (PMF). But, they are not same!!!
  • PDF is not Probability! It only means how much probability is concentrated per unit length (d𝒙) near 𝒙, or how dense the probability is near 𝒙.
  • For discrete random variables, we look up the value of a PMF at a single point to find its probability P(𝐗=𝒙).
  • For continuous random variables, we take an integral of a PDF over a certain interval to find its probability that X will fall in that interval.
  • Thus, PDF can be greater than 1, such as in an exponential distribution:
    Pasted image 20230621135607.png|300

There are several major types of distributions for continuous variables (based on PDF):

Normal distribution

X \sim N (\mu, \sigma { #2} )f(x) = \frac{1}{\sqrt {2 \pi }\sigma} e^{ - \frac{(x-\mu)^2}{2\sigma { #2} }}

Exponential distribution

Xexp(λ)f(x)=λeλx  (x>0)

Weibull distribution

The exponential distribution is a special case of the Weibull distribution with \alpha = 1.

PDF:

f(x)=λαxα1eλxα  (x>0)

CDF:

F(x)=1eλxα

Uniform distribution

f(x)=1ba  (axb)